<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <title><spring:message code="message.model.peiSongQiYe"/><spring:message code="message.jieSuan.zhangHuChaKan"/></title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp"%>
    <style type="text/css">
        div.group-info {
            margin-top: 10px !important;
            margin-bottom: 0px !important;
        }
        input.innerInput {
            width: 98%;
        }
    </style>
</head>
<body class="skin-blue sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1><spring:message code="message.model.peiSongQiYe"/><spring:message code="message.jieSuan.zhangHuChaKan"/></h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.jieSuan.zhangHuGuanLi"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.model.peiSongQiYe"/><spring:message code="message.jieSuan.zhangHuGuanLi"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.model.peiSongQiYe"/><spring:message code="message.jieSuan.zhangHuChaKan"/></a></li>
        </ol>
     </section>
    <section class="content">
       <form id="form" method="post" class="form-horizontal">
        <div class=" box box-success">
           <div class="box-body">
               <div class="input">
               		<div class="textalign1"><spring:message code="message.listForm.qiYeMingCheng"/><spring:message code="message.yanZheng.maoHao"/></div>
                    <div class="boxinput">
                        <input type="text" class="textinput" id="orgName"  name="orgName" placeholder="<spring:message code="message.listForm.qiYeMingCheng"/>" />
                    </div>
                    <div class="textalign"><spring:message code="message.listForm.qiYeBianMa"/><spring:message code="message.yanZheng.maoHao"/></div>
                    <div class="boxinput">
                        <input type="text" class="textinput" id="orgCode" name="orgCode" placeholder="<spring:message code="message.listForm.qiYeBianMa"/>" />
                    </div>
                    <div class="textalign"><spring:message code="message.jieSuan.yinHangZhangHao"/><spring:message code="message.yanZheng.maoHao"/></div>
                    <div class="boxinput">
                        <input type="text" class="textinput" id="bankAcctNo" name="bankAcctNo" placeholder="<spring:message code="message.jieSuan.yinHangZhangHao"/>"/>
                    </div>
                </div>
                <div class="input">
                    <div class="textalign1"><spring:message code="message.jieSuan.kaiHuRen"/><spring:message code="message.yanZheng.maoHao"/></div>
                    <div class="boxinput">
                        <input type="text" class="textinput" id="acctHolder"  name="acctHolder" placeholder="<spring:message code="message.jieSuan.kaiHuRen"/>"/>
                    </div>
                    <div class="textalign"><spring:message code="message.listForm.shenHeZhuanTai"/><spring:message code="message.yanZheng.maoHao"/></div>
                    <div class="boxinput">
                        <select class="textinput" name="auditStatus" id = "auditStatus" >
                       		<option value=''><spring:message code="message.select.option"/></option>
                       		<option value="1"><spring:message code="message.jieSuan.tongGuo"/></option>
                       		<option value="2"><spring:message code="message.listForm.buTongGuo"/></option>
                       		<option value="0"><spring:message code="message.select.weishenhe"/></option>
                       </select>
                    </div>
                     <div class="textalign" >
                        <button type="button" onclick="gridSerch();" class="btn btn-success btn-sm" id="selectDicCompType"><spring:message code="message.button.seachSpacing"/></button>
                    </div> 
                </div>
            
               
            </div>
          </div>
        </form>
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        
        <form action="${ctx}/acctInfoCenter/toCenterDeliverySeeBank.html" method="post" id="BankForm">
            <input type="hidden" id="orgId" name="orgId">
        </form>
        
        <form action="${ctx}/acctInfoCenter/toCenterDeliverySeeTrans.html" method="post" id="BankAcctForm">
            <input type="hidden" id="BankOrgId" name="orgId">
        </form>
   </section>
    
   <%@ include file="/WEB-INF/component/commonJS.jsp"%>
   <script type="text/javascript">
   //绑定回车
   $('#orgCode,#orgName,#bankAcctNo,#acctHolder,#auditStatus').bind('keydown', function(event) {
       if (event.keyCode == "13") {
           $('#selectDicCompType').click();
       }
   });	
   $("#orgName").focus();//加载页面光标在第一个查询框内
   
   
        $(function() {
            $("#gridlist").jqGrid(
                    {   url : "getCenterDeliverySee.html",
                        mtype : "POST",
                        datatype : "json",
                        autowidth : true,
                        height : 325,
                        shrinkToFit : false,
                        colNames : ['<spring:message code="message.jqGrid.cz"/> ', 
                                    '<spring:message code="message.jieSuan.zhangHu"/>id',
                                    '<spring:message code="message.listForm.qiYeBianMa"/>',
                                    '<spring:message code="message.listForm.qiYeMingCheng"/> ',
                                    '<spring:message code="message.jieSuan.yinHangZhangHao"/>id',
                                    '<spring:message code="message.jieSuan.zhangHu"/>id',
                                    '<spring:message code="message.jieSuan.yinHangZhangHao"/>',
                                    '<spring:message code="message.jieSuan.kaiHuRen"/>',
                                    '<spring:message code="message.jieSuan.kaiHuHang"/>',
                                    '<spring:message code="message.jieSuan.kaiHuHangHangHao"/> ',
                                    '<spring:message code="message.jieSuan.kaiHuHangHangMing"/>',
                                    '<spring:message code="message.jieSuan.tiJiaoRen"/>',
                                    '<spring:message code="message.jieSuan.tiJiaoShiJian"/>',
                                    '<spring:message code="message.listForm.shenHeZhuanTai"/>',
                                    '<spring:message code="message.jieSuan.auditPeople"/>',
                                    '<spring:message code="message.jieSuan.auditTime"/>',
                                    '<spring:message code="message.listForm.shenHeBeiZhu"/>'
                                    ],
                        colModel : [
                            {name : 'order',width : 80,align : "center", sortable:false,
                              formatter:function(val, opts,rowdata) {
                                var str ="";
                                str =  "<a href='toCenterDeliverySeeBankEdit.html?bankAcctId=" +rowdata.bankAcctId  + "' style='background:url(${ctx}/lib/img/icon/icon.png) no-repeat 0px 0px' class='opIcon' title='<spring:message code="message.button.edit"/>'></a>"
                                return str
                                    }
                            },
                            {name : 'orgId',hidden : true , width : 100,align : "center", sortable:false},
                            {name : 'orgCode',width : 120,align : "center", sortable:false},  
                            {name : 'orgName',width : 160,align : "left", sortable:false,
                            	 formatter:function(cellvalue, options,row) {
									 return "<a href=\"javascript:$.HN.dialog.opendialog('"+row.orgId+"','"+cellvalue+"','/medstgmini/stdCompinfo/toStdCompinfoDetail.html?compId="+row.orgId+"','800px','400px',function operResult(val){return operResult;})\">"+cellvalue+"</a>";
					     		}                  
                            }, 
                            {name : 'bankAcctId', hidden : true,width : 100,align : "center", sortable:false},
                            {name : 'settleAcctId',hidden : true , width : 100,align : "center", sortable:false},
                            {name : 'bankAcctNo', width : 160,align : "center", sortable:false},   
                            {name : 'acctHolder',width : 80,align : "center", sortable:false}, 
                            {name : 'depositBank', hidden:true,width : 120,align : "center", sortable:false},
                            {name : 'depositBankNo',width : 120,align : "center", sortable:false},
                            {name : 'depositBankName',width : 200,align : "left", sortable:false},
                            {name : 'submitUserName',width : 160,align : "center", sortable:false},
                            {name : 'submitTime',width : 160,align : "center", sortable:false},
                            {name : 'auditStatusName',width : 120,align : "center", sortable:false},
                            {name : 'auditUserName',width : 160,align : "center", sortable:false},
                            {name : 'auditTime',width : 160,align : "center", sortable:false},
                            {name : 'auditRemark',width : 160,align : "center", sortable:false}
                            
                        ],
                        rowNum : 20,
                        rowList : [ 10, 20, 50,100],
                        rownumbers : true,
                        pager : "#gridpage",
                        //multiselect: true, 
                        viewrecords : true,
                        gridComplete: function(){
           	        	 //序号列宽度自适应（参数为jqgridID）
           	               autoRNWidth("gridlist");
           	           	//数据只有一条时默认选中（参数为jqgridID）
           	               selectByOneData("gridlist");
           			},
                        caption : "<spring:message code="message.model.peiSongQiYe"/><spring:message code="message.jieSuan.zhangHuLieBiao"/>",
                        jsonReader : {
                            repeatitems : false,
                            id : "ids"
                        }
                    });
            $("#gridlist").jqGrid('navGrid', '#gridpage', {add : false,edit : false,del : false,search : false,refresh : false});
            $(window).trigger("resize");
        });
               function getFoucs(obj, rowId) {
                   var text = $.trim($(obj).val());
                   if (text != null && text != "") {
                       var $checkbox = $("#jqg_gridlist_" + rowId);
                       if ($checkbox.is(":not(:checked)")) {
                           $("#gridlist").setSelection(rowId);
                       }
                   }
               }
               
               //查询
               function gridSerch() {
            	   var orgCode = $.trim($("#orgCode").val());
                   var orgName = $.trim($("#orgName").val());
                   var bankAcctNo = $.trim($("#bankAcctNo").val());
                   var acctHolder = $.trim($("#acctHolder").val());
                   var auditStatus = $.trim($("#auditStatus").val());
                   $("#gridlist").jqGrid('setGridParam',{  
                       datatype:'json',
                       postData:{
                           "orgCode":orgCode,
                           "orgName":orgName,
                           "bankAcctNo":bankAcctNo,
                           "acctHolder":acctHolder,
                           "auditStatus":auditStatus
                       },
                       page:1
                   }).trigger("reloadGrid"); //重新载入  
               }
               
               //查看银行账户信息
                 function bankLook(id) {
                   $("#orgId").val(id);
                   $("#BankForm").submit();
                 }
                    
               
               //查看交易明细
               function bankAcctLook(id){
                   $("#BankOrgId").val(id);
                   $("#BankAcctForm").submit();
               }
    </script>
</body>
</html>